﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="BannerUploader.ascx.vb"
    Inherits="WebForm_ManageBanner_BannerUploader" %>
<asp:FormView ID="FormView1" runat="server" DataKeyNames="BannerID" Width="100%"
    DataSourceID="ObjectDataSource1">
    <ItemTemplate>
        <table id="table1" runat="server" border="0" width="100%">
            <tr>
                <td align="right" width="15%">
                    <asp:Label ID="Label1" runat="server" Text="<%$ Resources:File %>"></asp:Label>
                </td>
                <td>
                    <asp:TextBox Style="display: none" ID="txtPostedFileName" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtPostedFileName" runat="server" ControlToValidate="hiFileUpload"
                        Display="None" ErrorMessage="<%$ Resources:txtPostedFileName %>" ValidationGroup="Save"></asp:RequiredFieldValidator>
                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# Bind("theFileName") %>' ToolTip="aaa" />
                    <asp:FileUpload ID="hiFileUpload" runat="server" Width="50%" />
                    <asp:ImageButton Visible="false" ID="btnUpLoad" ImageUrl="~/images/image/but_18.jpg" OnClick="btnUpLoad_Click" ValidationGroup="Upload" runat="server" />

<%--                    <asp:RequiredFieldValidator ID="chk_hiFileUpload" runat="server" ControlToValidate="hiFileUpload"
                        Display="None" ErrorMessage="<%$ Resources:chk_hiFileUpload %>" ValidationGroup="Save"></asp:RequiredFieldValidator>
--%>                    &nbsp;
                </td>
            </tr>
            <tr>
                <td align="right" width="15%">
                    <asp:Label ID="lblUrl" runat="server" Text="<%$ Resources:Url %>"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtUrl" runat="server" MaxLength="50" Width="95%" Text='<%# Bind("Url") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtUrl" runat="server" ControlToValidate="txtUrl"
                        Display="None" ErrorMessage="<%$ Resources:chk_txtUrl %>" ValidationGroup="Save"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources:Desc %>"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtDesc" runat="server" Rows="3" Width="95%" MaxLength="50" Text='<%# Bind("Description") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtDesc" runat="server" ControlToValidate="txtDesc"
                        Display="None" ErrorMessage="<%$ Resources:chk_txtDesc %>" ValidationGroup="Save"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblActive" runat="server" Text="<%$ Resources:Active %>"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlActive" runat="server" 
                        ondatabinding="ddlActive_DataBinding" SelectedValue='<%# Bind("Active") %>'>
                    </asp:DropDownList>
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="List"
                        ShowMessageBox="True" ShowSummary="False" ValidationGroup="Upload" />
                    <asp:ValidationSummary ID="ValidationSummary2" runat="server" DisplayMode="List"
                        ShowMessageBox="True" ShowSummary="False" ValidationGroup="Save" />
                </td>
            </tr>
        </table>
    </ItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="Banner_SelectByBannerID" TypeName="BLL_Banner">
    <SelectParameters>
        <asp:Parameter Name="BannerID" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

